package com.kexio.enterprise.integration.message.statistics;

import com.kexio.enterprise.integration.message.enums.MessageType;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * 消息统计信息
 * 
 * @author Kexio
 * @since 1.0.0
 */
public class MessageStatistics {
    private LocalDateTime startTime;
    private LocalDateTime endTime;
    private long totalMessages;
    private long sentMessages;
    private long failedMessages;
    private long deliveredMessages;
    private double successRate;
    private double deliveryRate;
    private long averageSendTime;
    private long maxSendTime;
    private long minSendTime;
    private Map<MessageType, Long> typeStats; // 按类型统计
    private Map<String, Long> providerStats; // 按服务商统计
    private Map<String, Long> hourlyStats; // 按小时统计

    // Getters and Setters
    public LocalDateTime getStartTime() { return startTime; }
    public void setStartTime(LocalDateTime startTime) { this.startTime = startTime; }
    
    public LocalDateTime getEndTime() { return endTime; }
    public void setEndTime(LocalDateTime endTime) { this.endTime = endTime; }
    
    public long getTotalMessages() { return totalMessages; }
    public void setTotalMessages(long totalMessages) { this.totalMessages = totalMessages; }
    
    public long getSentMessages() { return sentMessages; }
    public void setSentMessages(long sentMessages) { this.sentMessages = sentMessages; }
    
    public long getFailedMessages() { return failedMessages; }
    public void setFailedMessages(long failedMessages) { this.failedMessages = failedMessages; }
    
    public long getDeliveredMessages() { return deliveredMessages; }
    public void setDeliveredMessages(long deliveredMessages) { this.deliveredMessages = deliveredMessages; }
    
    public double getSuccessRate() { return successRate; }
    public void setSuccessRate(double successRate) { this.successRate = successRate; }
    
    public double getDeliveryRate() { return deliveryRate; }
    public void setDeliveryRate(double deliveryRate) { this.deliveryRate = deliveryRate; }
    
    public long getAverageSendTime() { return averageSendTime; }
    public void setAverageSendTime(long averageSendTime) { this.averageSendTime = averageSendTime; }
    
    public long getMaxSendTime() { return maxSendTime; }
    public void setMaxSendTime(long maxSendTime) { this.maxSendTime = maxSendTime; }
    
    public long getMinSendTime() { return minSendTime; }
    public void setMinSendTime(long minSendTime) { this.minSendTime = minSendTime; }
    
    public Map<MessageType, Long> getTypeStats() { return typeStats; }
    public void setTypeStats(Map<MessageType, Long> typeStats) { this.typeStats = typeStats; }
    
    public Map<String, Long> getProviderStats() { return providerStats; }
    public void setProviderStats(Map<String, Long> providerStats) { this.providerStats = providerStats; }
    
    public Map<String, Long> getHourlyStats() { return hourlyStats; }
    public void setHourlyStats(Map<String, Long> hourlyStats) { this.hourlyStats = hourlyStats; }
}
